﻿using System;

namespace Events
{
    class Program
    {
        static void Main(string[] args)
        {
            MyClass obj = new MyClass();
            obj.Event1 += obj_Event1;
            obj.Event2 += obj_Event2;

            obj.Event1(null, null);
            //obj.Event2()

            obj.F();
        }

        private static void obj_Event1(object sender, EventArgs e)
        {
            Console.WriteLine("Event1 triggered");
        }
        private static void obj_Event2(object sender, EventArgs e)
        {
            Console.WriteLine("Event2 triggered");
        }
    }
}
